home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / buildEditMenu.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  21.9 KB  |  791 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. // Alias|Wavefront Script File
  19. // MODIFY THIS AT YOUR OWN RISK
  20. //
  21. // Creation Date:  14 July 1996
  22. // Author:         jb
  23. //
  24. //
  25. //  Procedure Name:
  26. //      EditMenu
  27. //
  28. //  Description:
  29. //        This procedure creates the main menubar Edit menu.
  30. //
  31. //  Input Arguments:
  32. //      Parent window that menu will be a part of.
  33. //
  34. //  Return Value:
  35. //      None.
  36. //
  37.  
  38. global proc deleteSelectRigidBodies() 
  39. //
  40. //    Deletes all the rigid bodies associated
  41. //  with the selected items.
  42. //
  43. {
  44.        string $selectedItems[] = `ls -sl`; 
  45.  
  46.     for ($i = 0; $i < size( $selectedItems ); $i++)
  47.     {
  48.          string    $leaves[] = `ls -dag -leaf -showType $selectedItems[$i]`;
  49.  
  50.         // Delete all the selected rigid bodies.
  51.         //
  52.         for ($j = 0; $j < size( $leaves ); $j += 2)
  53.         {
  54.             if ($leaves[$j+1] == "rigidBody")
  55.             {
  56.                 delete $leaves[$j];
  57.             }
  58.         }
  59.     }
  60. }
  61.  
  62. global proc defineCharacter( ) 
  63. //
  64. //  Procedure Name:
  65. //      defineCharacter
  66. //
  67. //  Description:
  68. //        Creates a set using the selected items,
  69. //        so that users can define all the nodes
  70. //        in the DAG that make up their "characters".
  71. //
  72. //  Input Arguments:
  73. //      None.
  74. //
  75. //  Return Value:
  76. //      None.
  77. {
  78.     // Prompt the user for a new character name
  79.     //
  80.     string $result = `promptDialog 
  81.         -title "Create Quick Select Set"
  82.         -message "Enter Quick Select Set name:" 
  83.         -text "Set"
  84.         -button "OK" 
  85.         -button "Cancel" 
  86.         -defaultButton "OK" 
  87.         -cancelButton "Cancel" 
  88.         -dismissString "Cancel"`;
  89.  
  90.     // If the result was "OK", then proceed
  91.     //
  92.     if ( $result == "OK" ) {
  93.  
  94.         // Also, notice that the `type` is being set
  95.         // to "gCharacterSet" - just trying to pick
  96.         // a name that users probably won't type
  97.         //
  98.         string $characterName = `promptDialog -q`;
  99.         sets -text "gCharacterSet" -name $characterName;
  100.  
  101.     }
  102. }
  103.  
  104.  
  105. global proc createCharacterMenu( string $parent )
  106. //
  107. //    Creates entries in the "Select Character" subMenu
  108. //    in the Edit Menu.
  109. {
  110.     setParent -m $parent;
  111.     menu -e -dai $parent;
  112.  
  113.     // Get a list of all character sets in the
  114.     // system, then generate an entry per set
  115.     //
  116.     string $charSets[] = `ls -sets`;
  117.  
  118.     for( $character in $charSets )
  119.     {
  120.         if( `sets -q -t $character` == "gCharacterSet" )
  121.         {
  122.             menuItem -l $character -c ( "select -r " + $character );
  123.         }
  124.     }
  125.  
  126.     if( `menu -q -ni $parent` == 0 ) 
  127.     //
  128.     //    No characters defined - create a default menu item
  129.     //    to inform the user
  130.     {
  131.         menuItem -l "No Quick Select Sets Defined" -enable false;
  132.     }
  133. }
  134.  
  135.  
  136. global proc editMenuUpdate( string $parent ) {
  137.  
  138.     string $lastName;
  139.     
  140.     // Get the name of the  recent command
  141.     string $label[] = `repeatLast -cnl 1`;
  142.     if (size($label) <= 0) {
  143.         menuItem -e -l "Repeat" -enable false ( $parent + "|lastAgainItem" );
  144.     } else {
  145.         $label[0] = makeStringSingleLine( $label[0] );
  146.         $lastName = "Repeat \"" + $label[0] + "\"";
  147.         menuItem -e -l $lastName -enable true ( $parent + "|lastAgainItem" );
  148.     }
  149. }
  150.  
  151. global proc buildEditMenu ( string $parent ) {
  152.     int $dimWhenNoSelect = 0;
  153.     int $completeLicense = `licenseCheck -m "edit" -typ "complete"`;        
  154.  
  155.     setParent -menu $parent;
  156.  
  157.     if( `menu -q -ni $parent` != 0 ) {
  158.         //
  159.         //  Menu is built already - just return
  160.         //
  161.         return;
  162.     }
  163.  
  164.     menuItem -label "Undo" 
  165.         -ecr false
  166.         -annotation "Undo: Undo the last action"
  167.         -command ("Undo") undoItem;
  168.     if( $dimWhenNoSelect )
  169.         dimWhen -f "UndoAvailable" ($parent+"|undoItem");
  170.  
  171.     menuItem -label "Redo"
  172.         -ecr false
  173.         -annotation "Redo: Redo the last undone action"
  174.         -command ("Redo") redoItem;
  175.     if( $dimWhenNoSelect )
  176.         dimWhen -f "RedoAvailable" ($parent+"|redoItem");
  177.  
  178.     menuItem -label "Repeat" 
  179.         -ecr false -enable false -command ("RepeatLast")
  180.         -annotation "Repeat: Repeat the last action"
  181.         lastAgainItem;
  182.     scriptJob -permanent -parent $parent 
  183.         -event "RecentCommandChanged" ( "editMenuUpdate " + $parent );
  184.  
  185.     menuItem -label "Recent Commands..."
  186.         -ecr false 
  187.         -annotation "Recent Commands: Show a list of recent menu commands"
  188.         -command ("RecentCommandsWindow");
  189.  
  190.     menuItem -divider true;
  191.  
  192.     menuItem -l "Cut" 
  193.         -annotation "Cut: Cut the selected object(s)"
  194.         -command ("CutSelected") cutItem;
  195.     
  196.     menuItem -l "Copy" 
  197.         -annotation "Copy: Copy the selected object(s)"
  198.         -command ("CopySelected") copyItem;
  199.     
  200.     menuItem -l "Paste" 
  201.         -annotation "Paste: Paste the selected object(s)"
  202.         -command ("PasteSelected") pasteItem;
  203.  
  204.     menuItem -divider true;
  205.  
  206.     //    Keys sub-menu.
  207.     //
  208.     menuItem -label "Keys" -subMenu true -aob true -to true cutKeyHierItem;
  209.  
  210.     menuItem -label "Cut Keys"
  211.         -annotation "Cut Keys: Remove keys and place on animation clipboard"
  212.         -command ("CutKeys")
  213.         -dragMenuCommand "performCutKeyArgList 1 {\"2\", \"animationList\", \"0\"}" cutKeyItem;
  214.         menuItem -optionBox true 
  215.             -annotation "Cut Keys Option Box"
  216.             -label "Cut Keys Option Box"
  217.             -command ("CutKeysOptions")
  218.             cutKeyDialogItem;
  219.  
  220.     menuItem -label "Copy Keys" 
  221.         -annotation "Copy Keys: Copy keys and place on animation clipboard"
  222.         -command ("CopyKeys")
  223.         -dragMenuCommand "performCopyKeyArgList 1 {\"2\", \"animationList\", \"0\"}" copyKeyItem;
  224.         menuItem -optionBox true 
  225.             -annotation "Copy Keys Option Box"
  226.             -label "Copy Keys Option Box"
  227.             -command ("CopyKeysOptions")
  228.             copyKeyDialogItem;
  229.  
  230.     menuItem -label "Paste Keys" 
  231.         -annotation "Paste Keys: Paste keys from animation clipboard"
  232.         -command ("PasteKeys")
  233.         -dragMenuCommand "performPasteKeyArgList 1 {\"2\", \"animationList\", \"0\"}" pasteKeyItem;
  234.         menuItem -optionBox true 
  235.             -annotation "Paste Keys Option Box"
  236.             -label "Paste Keys Option Box"
  237.             -command ("PasteKeysOptions")
  238.             pasteKeyDialogItem;
  239.  
  240.     menuItem -label "Delete Keys" 
  241.         -annotation "Delete Keys: Delete keys but do not place on animation clipboard"
  242.         -command ("DeleteKeys")
  243.         -dragMenuCommand "performClearKeyArgList 1 {\"2\", \"animationList\", \"0\", \"0\"}" clearKeyItem;
  244.         menuItem -optionBox true 
  245.             -annotation "Delete Keys Option Box"
  246.             -label "Delete Keys Option Box"
  247.             -command ("DeleteKeysOptions")
  248.             clearKeyDialogItem;
  249.  
  250.     menuItem -label "Scale Keys" 
  251.         -annotation "Scale Keys: Scale keyed animation in time and/or value"
  252.         -command ("ScaleKeys")
  253.         -dragMenuCommand "performScaleKeyArgList 1 {\"2\", \"animationList\", \"0\"}" scaleKeyItem;
  254.         menuItem -optionBox true 
  255.             -annotation "Scale Keys Option Box"
  256.             -label "Scale Keys Option Box"
  257.             -command ("ScaleKeysOptions")
  258.             scaleKeyDialogItem;
  259.  
  260.     menuItem -label "Snap Keys" 
  261.         -annotation "Snap Keys: Snap keys to integer times"  
  262.         -command ("SnapKeys")
  263.         -dragMenuCommand "performSnapKeyArgList 1 { \"2\", \"animationList\", \"0\" }" 
  264.         snapKeyItem;
  265.         menuItem -optionBox true 
  266.             -annotation "Snap Keys Option Box"
  267.             -label "Snap Keys Option Box"
  268.             -command ("SnapKeysOptions")
  269.             snapKeyDialogItem;
  270.  
  271.     menuItem -divider true;
  272.  
  273.     menuItem -label "Bake Simulation"
  274.         -command ("BakeSimulation")
  275.         -annotation "Bake Simulation: Bake existing animation into keys"
  276.         -dragMenuCommand "performBakeSimulationArgList 1 {\"2\", \"animationList\"}"
  277.         bakeSimulationItem;
  278.         menuItem -optionBox true 
  279.             -annotation "Bake Simulation Option Box"
  280.             -label "Bake Simulation Option Box"
  281.             -command ("BakeSimulationOptions")
  282.             bakeSimulationDialogItem;
  283.             
  284.     setParent -menu ..;
  285.  
  286.     menuItem -divider true;
  287.  
  288.     menuItem -l "Delete" 
  289.         -annotation "Delete: Delete the selected object(s)"
  290.         -command ("Delete") clearItem;
  291.     if( $dimWhenNoSelect )
  292.         dimWhen -f "SomethingSelected" ($parent+"|clearItem");
  293.  
  294.     //    Delete by Type sub-menu.
  295.     //
  296.     menuItem -label "Delete by Type" 
  297.         -subMenu true -allowOptionBoxes true -to true 
  298.         clearActiveItem;
  299.  
  300.     menuItem -l "History" 
  301.         -annotation "Delete History: Delete construction history on the selected object(s)"
  302.         -command ("DeleteHistory")
  303.         clearConstHistoryTypesItem;
  304.  
  305.     menuItem -divider true;
  306.  
  307.     menuItem -label "Channels" -allowOptionBoxes true 
  308.         -annotation "Delete Channels: Delete channels on the selected object(s)"
  309.         -command ("DeleteChannels")
  310.         clearChannelsTypesItem;
  311.         menuItem -optionBox true 
  312.             -annotation "Delete Channels Option Box"
  313.             -label "Channels Option Box"
  314.             -command ("DeleteChannelsOptions")
  315.             clearAllChannelsDialogItem;
  316.  
  317.     menuItem -label "Static Channels" -allowOptionBoxes true
  318.         -annotation "Delete Static Channels: Delete static channels on the selected object(s)"
  319.         -command ("DeleteStaticChannels")
  320.         clearStaticTypesItem;
  321.         menuItem -optionBox true 
  322.             -annotation "Delete Static Channels Option Box"
  323.             -label "Static Channels Option Box"
  324.             -command ("DeleteStaticChannelsOptions")
  325.             clearAllStaticChannelsDialogItem;
  326.  
  327.     menuItem -label "Motion Paths"
  328.         -annotation "Delete Motion Paths: Delete motion paths on the selected object(s)"
  329.         -command ("DeleteMotionPaths")
  330.         clearMotionPathTypesItem;
  331.  
  332.     menuItem -label "Non-particle Expressions" -allowOptionBoxes true 
  333.         -annotation "Delete Non-particle Expressions: Delete non-particle expressions on the selected object(s)"
  334.         -command ("DeleteExpressions")
  335.         clearExpressionTypesItem;
  336.         menuItem -optionBox true 
  337.             -annotation "Delete Non-particle Expressions Option Box"
  338.             -label "Non-particle Expressions Option Box"
  339.             -command ("DeleteExpressionsOptions")
  340.             clearAllExpressionsDialogItem;
  341.  
  342.     menuItem -label "Constraints"
  343.         -annotation "Delete Constraints: Delete constraints on the selected object(s)"
  344.         -command ("DeleteConstraints")
  345.         clearConstraintTypesItem;
  346.  
  347.     //    Sounds sub-menu.
  348.     //
  349.     string $soundMenu = `menuItem -l "Sounds"
  350.         -subMenu true 
  351.         -allowOptionBoxes false deleteSoundSubMenuItem`;
  352.     
  353.     menuItem -e -pmc (
  354.         "updateSoundMenu { " +
  355.             "\"" + $soundMenu + "\", " +
  356.             "\"0\", " +
  357.             "\"delete %s\", " +
  358.             "\"Delete sound node %s\" " + 
  359.         "};" 
  360.         )                        
  361.         $soundMenu;
  362.     
  363.     setParent -menu ..;
  364.  
  365.     menuItem -divider true;
  366.  
  367.     if(`licenseCheck -m edit -type complete` == 1)
  368.     {
  369.         menuItem -label "Rigid Bodies"
  370.             -annotation "Delete Rigid Bodies: Delete rigid bodies on the selected object(s)"
  371.             -command ("DeleteRigidBodies")
  372.             clearRigidBodyTypesItem;
  373.     }
  374.     setParent -menu ..;
  375.  
  376.     //    Delete all by Type sub-menu.
  377.     //
  378.     if( $dimWhenNoSelect )
  379.         dimWhen -f "SomethingSelected" ($parent+"|clearActiveItem");
  380.  
  381.     menuItem -label "Delete All by Type" 
  382.         -subMenu true -allowOptionBoxes false -to true clearAllTypesItem;
  383.     
  384.     menuItem -label "History" 
  385.         -annotation "Delete All History: Delete History on all objects"
  386.         -command ("DeleteAllHistory")
  387.         clearAllHistoryTypesItem;
  388.  
  389.     menuItem -divider true;
  390.  
  391.     menuItem -label "Channels" 
  392.         -annotation "Delete All Channels"
  393.         -command ("DeleteAllChannels")
  394.         clearAllChannelsItem;
  395.  
  396.     menuItem -label "Static Channels" 
  397.         -annotation "Delete All Static Channels"
  398.         -command ("DeleteAllStaticChannels")
  399.         clearAllStaticTypesItem;
  400.  
  401.     menuItem -label "Clips" 
  402.         -annotation "Delete All Clips"
  403.         -command ("DeleteAllClips")
  404.         clearAllClipsItem;
  405.  
  406.     menuItem -label "Motion Paths"
  407.         -annotation "Delete All Motion Paths"
  408.         -command ("DeleteAllMotionPaths")
  409.         clearAllMotionPathsItem;
  410.  
  411.     menuItem -label "Non-particle Expressions"
  412.         -annotation "Delete All Non-particle Expressions"
  413.         -command ("DeleteAllExpressions")
  414.         clearAllExprTypesItem;
  415.  
  416.     menuItem -label "Constraints"
  417.         -annotation "Delete All Constraints"
  418.         -command ("DeleteAllConstraints")
  419.         clearAllConstraintTypesItem;
  420.  
  421.     menuItem -label "Sounds"
  422.         -annotation "Delete All Sounds"
  423.         -command ("DeleteAllSounds")
  424.         clearAllSoundsItem;
  425.  
  426.     menuItem -divider true;
  427.  
  428.     menuItem -label "Joints"
  429.         -annotation "Delete All Joints"
  430.         -command ("DeleteAllJoints")
  431.         clearAllJointTypeItem;
  432.  
  433.     menuItem -label "IK Handles"
  434.         -annotation "Delete All IK Handles"
  435.         -command ("DeleteAllIKHandles")
  436.         clearAllIKHandleTypeItem;
  437.  
  438.     menuItem -divider true;
  439.  
  440.     menuItem -label "Lattices" 
  441.         -annotation "Delete All Lattices"
  442.         -command ("DeleteAllLattices");
  443.  
  444.     if ($completeLicense) {
  445.         menuItem -label "Clusters" 
  446.             -annotation "Delete All Clusters"
  447.             -command ("DeleteAllClusters");
  448.         menuItem -label "Sculpt Objects" 
  449.             -annotation "Delete All Sculpt Objects"
  450.             -command ("DeleteAllSculptObjects");
  451.     }
  452.  
  453.     menuItem -label "Nonlinears" 
  454.         -annotation "Delete All Nonlinear Deformers"
  455.         -command ("DeleteAllNonLinearDeformers");
  456.  
  457.     if ($completeLicense) {
  458.         menuItem -label "Wires" 
  459.             -annotation "Delete All Wires"
  460.             -command ("DeleteAllWires");
  461.     }
  462.  
  463.     menuItem -divider true;
  464.  
  465.     menuItem -label "Lights" 
  466.         -enable true 
  467.         -annotation "Delete All Lights"
  468.         -command ("DeleteAllLights")
  469.         clearAllLightsTypesItem;
  470.  
  471.     menuItem -label "Cameras" 
  472.         -enable true 
  473.         -annotation "Delete All Cameras"
  474.         -command ("DeleteAllCameras")
  475.         clearAllCamerasTypesItem;
  476.  
  477.     menuItem -label "Image Planes" 
  478.         -annotation "Delete All Image Planes"
  479.         -command ("DeleteAllImagePlanes")
  480.         clearAllImagePlanesTypesItem;
  481.  
  482.     menuItem -label "Shading Groups and Materials" 
  483.         -enable true 
  484.         -annotation "Delete All Shading Groups and Materials"
  485.         -command ("DeleteAllShadingGroupsAndMaterials")
  486.         clearAllMaterialTypesItem;
  487.  
  488.     menuItem -divider true;
  489.  
  490.     if( `licenseCheck -m edit -type complete` == 1 )
  491.     {
  492.         menuItem -label "Particles" 
  493.             -annotation "Delete All Particles"
  494.             -command ("DeleteAllParticles")
  495.             selParticlesItem;
  496.  
  497.         menuItem -label "Rigid Bodies" 
  498.             -annotation "Delete All Rigid Bodies"
  499.             -command ("DeleteAllRigidBodies")
  500.             selRigidBodiesItem;
  501.  
  502.         menuItem -label "Rigid Constraints" 
  503.             -annotation "Delete All Rigid Constraints"
  504.             -command ("DeleteAllRigidConstraints")
  505.             selRigidConstraintsItem;
  506.     }
  507.     if( fluidEditLicenseFound() ) {
  508.         menuItem -label "Fluids" 
  509.             -annotation "Delete All Fluids"
  510.             -command ("DeleteAllFluids")
  511.             clearFluidsItem;
  512.     }
  513.  
  514.     if(`isTrue "MayaCreatorExists"` && (`licenseCheck -m "edit" -typ "particlePaint"`)) {
  515.         menuItem -d 1;
  516.         menuItem -label "Strokes" 
  517.             -annotation "Delete All Strokes"
  518.             -command ("DeleteAllStrokes")
  519.             clearAllStrokesItem;
  520.     }
  521.  
  522.     setParent -menu ..;
  523.  
  524.     menuItem -divider true;
  525.  
  526.     menuItem -label "Select All" 
  527.         -annotation "Select All"
  528.         -command ("SelectAll") selectAllItem;
  529.  
  530.     //    Select Hierarchy.
  531.     //
  532.     menuItem -label "Select Hierarchy"
  533.         -annotation "Select Hierarchy: Select all the children of the current selection"
  534.         -command ("SelectHierarchy");
  535.  
  536.     menuItem -label "Invert Selection" 
  537.         -annotation "Invert Selection"
  538.         -command ("InvertSelection") invertSelectionItem;
  539.  
  540.     //    Select all by type sub-menu.
  541.     //
  542.     menuItem -label "Select All by Type" -subMenu true -to true selAllHierItem;
  543.  
  544.     menuItem -label "Joints" 
  545.         -annotation "Select All Joints"
  546.         -command ("SelectAllJoints")
  547.         selJointsItem;
  548.  
  549.     menuItem -label "IK Handles" 
  550.         -annotation "Select All IK Handles"
  551.         -command ("SelectAllIKHandles")
  552.         selIKHanItem;
  553.  
  554.     menuItem -divider true;
  555.  
  556.     menuItem -label "Lattices" 
  557.         -annotation "Select All Lattices"
  558.         -command ("SelectAllLattices");
  559.  
  560.     if ($completeLicense) {
  561.         menuItem -label "Clusters"
  562.             -annotation "Select All Clusters"
  563.             -command ("SelectAllClusters");
  564.  
  565.         menuItem -label "Sculpt Objects" 
  566.             -annotation "Select All Sculpt Objects"
  567.             -command ("SelectAllSculptObjects");
  568.  
  569.         menuItem -label "Wires" 
  570.             -annotation "Select All Wires"
  571.             -command ("SelectAllWires");
  572.     }
  573.  
  574.     menuItem -divider true;
  575.  
  576.     menuItem -label "Transforms" 
  577.         -annotation "Select All Transforms"
  578.         -command ("SelectAllTransforms") 
  579.         selDAGItem;
  580.  
  581.     menuItem -label "Geometry" 
  582.         -annotation "Select All Geometry"
  583.         -command ("SelectAllGeometry") 
  584.         selGeomItem;
  585.  
  586.     menuItem -label "NURBS Curves" 
  587.         -annotation "Select All NURBS Curves"
  588.         -command ("SelectAllNURBSCurves")
  589.         selNurbsCurveItem;
  590.  
  591.     menuItem -label "NURBS Surfaces" 
  592.         -annotation "Select All NURBS Surfaces"
  593.         -command ("SelectAllNURBSSurfaces")
  594.         selNurbsSurfaceItem;
  595.  
  596.     menuItem -label "Polygon Geometry" 
  597.         -annotation "Select All Polygon Geometry"
  598.         -command ("SelectAllPolygonGeometry")
  599.         selPolysItem;
  600.  
  601.     if (`isTrue "SubdivUIExists"`){
  602.         menuItem -label "Subdiv Geometry" 
  603.             -annotation "Select All Subdiv Geometry"
  604.             -command ("SelectAllSubdivGeometry") 
  605.             selSubdivGeomItem;
  606.     }
  607.  
  608.     menuItem -divider true;
  609.  
  610.     menuItem -label "Lights" 
  611.         -annotation "Select All Lights"
  612.         -command ("SelectAllLights")
  613.         selLightsItem;
  614.  
  615.     menuItem -label "Cameras" 
  616.         -annotation "Select All Cameras"
  617.         -command ("SelectAllCameras")
  618.         selCamerasItem;
  619.  
  620.     menuItem -label "Image Planes" 
  621.         -annotation "Select All Image Planes"
  622.         -command ("SelectAllImagePlanes");
  623.  
  624.     menuItem -divider true;
  625.  
  626.     if( `licenseCheck -m edit -type complete` == 1 )
  627.     {
  628.         menuItem -label "Particles" 
  629.             -annotation "Select All Particles"
  630.             -command ("SelectAllParticles")
  631.             selParticlesItem;
  632.  
  633.         menuItem -label "Rigid Bodies" 
  634.             -annotation "Select All Rigid Bodies"
  635.             -command ("SelectAllRigidBodies")
  636.             selRigidBodiesItem;
  637.  
  638.         menuItem -label "Rigid Constraints" 
  639.             -annotation "Select All Rigid Constraints"
  640.             -command ("SelectAllRigidConstraints")
  641.             selRigidConstraintsItem;
  642.     }
  643.     if( fluidEditLicenseFound() ) {
  644.         menuItem -label "Fluids" 
  645.             -annotation "Select All Fluids"
  646.             -command ("SelectAllFluids")
  647.             selFluidsItem;
  648.     }
  649.  
  650.     if(`isTrue "MayaCreatorExists"` && (`licenseCheck -m "edit" -typ "particlePaint"`)) {
  651.         menuItem -d 1;
  652.         menuItem -label "Strokes"
  653.             -annotation "Select All Strokes"
  654.             -command ("SelectAllStrokes")
  655.             selAllStrokesItem;
  656.  
  657.         menuItem -label "Brushes"
  658.             -annotation "Select All Brushes"
  659.             -command ("SelectAllBrushes")
  660.             selAllBrushesItem;
  661.     }
  662.  
  663.     setParent -menu ..;
  664.  
  665.     //    Quick Select Sets sub-menu.
  666.     //
  667.     string $menu = `menuItem -label "Quick Select Sets" -sm true selectCharItem`;
  668.         menuItem -e -pmc ( "createCharacterMenu " + $menu ) $menu;
  669.     setParent -menu ..;
  670.  
  671.  
  672.     // Paint Selection tool. 
  673.     //
  674.     if (true || `licenseCheck -m "edit" -typ "artisan"` ) {
  675.  
  676.         menuItem -label "Paint Selection Tool" 
  677.             -image "artSelect.xpm"
  678.             -ann   "Paint Selection Tool: Paint selection of cvs/vertices/faces/edges"
  679.             -command ("ArtPaintSelectTool") artisanPaintSelectItem;
  680.  
  681.             menuItem -optionBox true  -image "artSelect.xpm"
  682.                 -ann "Paint Selection Tool Option Box"
  683.                 -label "Paint Selection Tool Option Box"
  684.                 -command ("ArtPaintSelectToolOptions")
  685.                 artisanPaintSelectDialogItem;
  686.     }
  687.             
  688.     menuItem -divider true;
  689.  
  690.     //    Duplicate.
  691.     //
  692.     menuItem -label "Duplicate" 
  693.         -annotation "Duplicate: Duplicate the selected object(s)"
  694.         -dmc "performDuplicate 2"
  695.         -command ("Duplicate") dupItem;
  696.         menuItem -optionBox true 
  697.             -annotation "Duplicate Option Box"
  698.             -label "Duplicate Option Box"
  699.             -command ("DuplicateOptions")
  700.             dupOptItem;
  701.     if( $dimWhenNoSelect )
  702.         dimWhen -f "SomethingSelected" ($parent+"|dupItem");
  703.  
  704.  
  705.     //    Duplicate with transforms.
  706.     //
  707.     menuItem -label "Duplicate with Transform" 
  708.         -annotation "Duplicate with Transform: Duplicate and apply the last transforms"
  709.         -command ("DuplicateWithTransform") smartDupItem;
  710.     if( $dimWhenNoSelect )
  711.         dimWhen -f "SomethingSelected" ($parent+"|smartDupItem");
  712.  
  713.     menuItem -divider true;
  714.  
  715.     //    Group.
  716.     //
  717.     menuItem -label "Group" -allowOptionBoxes true
  718.         -annotation "Group: Group the selected object(s)"
  719.         -dmc "performGroup 2"
  720.         -command ("Group") groupItem;
  721.     if( $dimWhenNoSelect )
  722.         dimWhen -f "SomethingSelected" ($parent+"|groupItem");
  723.         menuItem -optionBox true 
  724.             -annotation "Group Option Box"
  725.             -label "Group Option Box"
  726.             -command ("GroupOptions") groupOptItem;
  727.  
  728.     //    Ungroup.
  729.     //
  730.     menuItem -label "Ungroup" -allowOptionBoxes true 
  731.         -annotation "Ungroup: Ungroup the selected object(s)"
  732.         -dmc "performUngroup 2"
  733.         -command ("Ungroup") ungroupItem;
  734.     if( $dimWhenNoSelect )
  735.         dimWhen -f "SomethingSelected" ($parent+"|ungroupItem");
  736.         menuItem -optionBox true 
  737.             -annotation "Ungroup Option Box"
  738.             -label "Ungroup Option Box"
  739.             -command ("UngroupOptions")
  740.             ungrpOptItem;
  741.  
  742.     //    Level of Detail sub-menu.
  743.     //
  744.     menuItem -label "Level of Detail" -subMenu true -to true 
  745.         levelOfDetailItem;
  746.  
  747.     menuItem -label "Group" 
  748.         -image "levelOfDetail.xpm"
  749.         -annotation "Group Level of Detail: Select 2 or more transforms, high resolution first." 
  750.         -command ("LevelOfDetailGroup") -ec true lodGroupItem;
  751.  
  752.     menuItem -label "Ungroup"
  753.         -image "levelOfDetailDelete.xpm"
  754.         -annotation "Ungroup Level of Detail: Ungroup the selected Level of Detail object(s)."
  755.         -command ("LevelOfDetailUngroup") -ec true lodRemoveItem;
  756.  
  757.     setParent -menu ..;
  758.  
  759.     menuItem -divider true;
  760.  
  761.     //    Parent
  762.     //
  763.     menuItem -label "Parent" -allowOptionBoxes true 
  764.         -annotation "Parent: Parent the selected object(s) to the last selected object"
  765.         -dmc "performParent 2"
  766.         -command ("Parent") parentItem;
  767.     if( $dimWhenNoSelect )
  768.         dimWhen -f "SomethingSelected" ($parent+"|parentItem");
  769.         menuItem -optionBox true 
  770.             -annotation "Parent Option Box"
  771.             -label "Parent Option Box"
  772.             -command ("ParentOptions")
  773.             parentOptItem;
  774.  
  775.     //    Unparent
  776.     //
  777.     menuItem -label "Unparent" -allowOptionBoxes true
  778.         -annotation "Unparent: Unparent the selected object(s)"
  779.         -dmc "performUnparent 2"
  780.         -command ("Unparent") unparentItem;
  781.     if( $dimWhenNoSelect )
  782.         dimWhen -f "SomethingSelected" ($parent+"|unparentItem");
  783.         menuItem -optionBox true 
  784.             -annotation "Unparent Option Box"
  785.             -label "Unparent Option Box"
  786.             -command ("UnparentOptions")
  787.             unparOptItem;
  788.  
  789.     setParent -menu ..;
  790. }
  791.